% SGOTRANSFORM      Reconstruction of SGO filtered data to previous stage
%                   of data domain
%
% Function: transforming sgo data to voltage plots
%
%
% 
% Copyright: Group 8
% Modified at 20th Oct 2010
%-------------------------------------------------------------------------
function transform_data = sgotransform(data,sgo)
% Calculate the ratio between sgo and DA transformed data
Ratio_factor = 5.46e4 / 3.36;
% Transform the sgo data to DAQ recorded form
new_sgo(1:length(sgo)) = sgo(1:length(sgo)) * Ratio_factor;
% Ratio between 16bits data and recorded form
Ratio_data = 5/65536;
% Transform to the voltage form
volt_sgo =  Ratio_data * new_sgo(1:length(new_sgo));

%return function
transform_data = volt_sgo;